package com.util.baidu;

import net.sf.json.JSONObject;
import org.apache.commons.collections.map.HashedMap;

import java.util.HashMap;
import java.util.Map;

/**
 * Created by reeveslee on 16/5/14.
 */
public class MsgModelAndroid extends HashMap {
    private String title;
    private String description;
    public Map<String, Object> custom_content;

    public MsgModelAndroid() {
        super();
        title = "";
        description = "";
        custom_content = new HashedMap();
        super.put("title", title);
        super.put("description", description);
        super.put("custom_content", custom_content);
    }

    public void setTitle(String title) {
        this.title = title;
        super.replace("title", title);
    }

    public void setDescription(String description) {
        this.description = description;
        super.replace("description", description);
    }

    public String toJsonString() {
        return JSONObject.fromObject(this).toString();
    }
}
